<!--${_TPL.put("titles", ("首页动态"))}-->
<!--$embed{"header.htm"}-->

<div id="content">
<style type="text/css">
.mcStatus{overflow:hidden;position:relative;z-index:2;width:380px;height:44px;padding:8px 8px 8px 14px;background:url(image/multiComposer.gif) no-repeat;}
  .mcStatusInput{position:relative;padding:0 6px;zoom:1;}
    .mcStatusInput textarea{overflow:auto\9;width:100%;height:32px;*height:31px;margin:0 -6px;padding:5px;border:1px solid #eaeaea; color: #999; }
.mcStatusButton{position:relative;z-index:1;float:right;padding:3px 0 0;}
.composer { padding: 0 10px 5px 0px; overflow: hidden; }/*TODO in style.css*/
</style>

<!--$if{space.self}-->
	<div class="composer_header">
	
		<div class="ar_r_t"><div class="ar_l_t"><div class="ar_r_b"><div class="ar_l_b"><img src="${&com.heaven.web.utils.Common.avatar(_SGLOBAL['supe_uid'],'middle')}" alt="${_SN[_SGLOBAL['supe_uid']]}" width="100" /></div></div></div></div>
		
		<div class="composer">
			<h3 class="index_name">
				<a href="space.html?uid=${space['uid']}"<!--${&com.heaven.web.utils.Common.g_color(space['groupid'])}-->>${_SN[space['uid']]}</a>
			</h3>
      <span>&nbsp;等级:&nbsp; <!--${&com.heaven.web.utils.Common.g_icon(space['groupid'])}--> <a href="cp.html?ac=credit">${space['creditstar']}</a> &nbsp;&nbsp;&nbsp;&nbsp;金币:&nbsp;<a href="cp.html?ac=credit">${space['credit']}</a>个</span>
			<br>
      <p>
        <!--$if{space['viewnum']==0}-->&nbsp;还没有人来看过你, 做人要厚道!
				<!--$else-->&nbsp;已经有 <a href="space.html?uid=${space['uid']}&do=friend&view=visitor">${space['viewnum']}</a> 人来过, 出来混总有一天要还的!
        <!--$end-->
			</p>
			<div class="current_status" id="mystate">
				<!--$if{ space['mood']}--><a href="space.html?uid=${space['uid']}&do=mood" title="同心情"><img src="image/face/${space['mood']}.gif" alt="同心情" class="face" /></a> <!--$end-->
				<!--$if{ space['spacenote']}-->
					${space['spacenote']}
				<!--$elseif{ !space['mood']}-->
					说点什么冒个泡吧!
				<!--$end-->
				&nbsp;(<a href="space.html?uid=${space['uid']}&do=mood">去看看和你同心情的朋友!</a>)
			</div>
			<div id="mood_form" >
        <form method="post" action="cp.html?ac=doing" id="moodform">
        
          <div class="mcStatus" id="mood_statusinput">
            <div class="mcStatusInput"><textarea id='message' name='message' onclick="statusFace(this.id, this.id);" class="blank" cols="10" rows="3" tabindex="1">说点什么冒个泡吧!</textarea></div>
          </div>
          <div id="mood_add" class="mcStatusButton" style="top: -30px; opacity: 0;display:none"><span class="button"><span>
          <button type="button" id="add" name="add" tabindex="2" onclick="ajaxpost('moodform', 'mystate', 'reloadMood');">&nbsp;更新&nbsp;</button></span></span></div>
          <script type="text/javascript">
          	function reloadMood(showid, result) {
        	    var x = new Ajax();
        	    x.get('do.html?ac=ajax&op=getmood', function(s){
        	    	  document.getElementById('mystate').innerHTML = s;
        	    });
        	    //提示获得积分
        	    showreward();
        	    hiddenstatus(true);
        	  }
	          function statusFace() {
		          if(document.getElementById('message').value == '说点什么冒个泡吧!') {
		        	  document.getElementById('message').value = '';
		          }
		          document.getElementById('mood_add').style.display='';
	        	  document.getElementById('mood_add').style.top='5px';
	        	  document.getElementById('mood_add').style.opacity='100';
	        	  document.getElementById('message').style.color='#000000';
	        	  document.getElementById('mood_statusinput').style.zIndex = '20005';
	        	  document.getElementById('mood_add').style.zIndex = '20003';
	        	    
	        	  var div = document.getElementById('mood_face_bg');
	        	  if(div) {
	        	      div.parentNode.removeChild(div);
	        	  }
	        	  div = document.createElement('div');
	        	  div.id = 'mood_face_bg';
	        	  div.style.position = 'absolute';
	        	  div.style.left = div.style.top = '0px';
	        	  div.style.width = '100%';
	        	  div.style.height = document.body.scrollHeight + 'px';
	        	  div.style.backgroundColor = '#000';
	        	  div.style.zIndex = 10000;
	        	  div.style.display = 'none';
	        	  div.style.filter = 'alpha(opacity=0)';
	        	  div.style.opacity = 0;
	        	  div.onclick = function() {
	        	      hiddenstatus();
	        	  }
	        	  document.getElementById('append_parent').appendChild(div);
	
	        	  if(document.getElementById('message_menu') != null) {
		        	  document.getElementById('message_menu').style.display = '';
		        	  document.getElementById('mood_add').style.display = '';
		          } else {
		        	  var faceDiv = document.createElement("div");
		        	  faceDiv.id = 'message_menu';
		        	  faceDiv.className = 'facebox';
		        	  faceDiv.style.position = 'absolute';
		        	  var faceul = document.createElement("ul");
		        	  for(i=1; i<31; i++) {
		        	  	getStatusFace(i, faceul); 
		        	  }
		        	  faceDiv.appendChild(faceul);
		        	  document.getElementById('append_parent').appendChild(faceDiv);
	        	  }
	        	  //定位菜单
	        	  setMenuPosition('message', 0);
	        	  div.style.display = '';
	          }
	
	          function hiddenstatus(isFinish) {
	        	  document.getElementById('message_menu').style.display = 'none';
	        	  document.getElementById('mood_face_bg').style.display = 'none';
				  if(isFinish || document.getElementById('message').value == ''){
	        	      document.getElementById('message').value = '说点什么冒个泡吧!';
	        	      document.getElementById('mood_add').style.display = 'none';
				  }else{
					  document.getElementById('mood_add').style.display = '';
				  }
	        	  document.getElementById('message').style.color='#999';
	        	  document.getElementById('mood_statusinput').style.zIndex = '1';
	          }
	
	          function getStatusFace(i, faceul) {
	        	  var faceli = document.createElement("li");
	        	  faceli.innerHTML = '<img src="image/face/'+i+'.gif" style="cursor:pointer; position:relative;" />';
	        	  faceli.getElementsByTagName('img').item(0).onclick = function(){var faceText = '[em:'+i+':]'; if(document.getElementById('message') != null) { insertContent('message', faceText); }};
	        	  faceul.appendChild(faceli);
	          }
          </script>
          <input type="hidden" name="addsubmit" value="true" />
          <input type="hidden" name="spacenote" value="true" />
          <input type="hidden" name="formhash" value="<!--${&com.heaven.web.utils.Common.formhash()}-->" />
        </form>
      </div>
      <!-- 
			<ul class="u_setting">
				<li><a href="cp.html?ac=avatar">修改头像</a></li>
				<li><a href="cp.html?ac=profile">个人资料</a></li>
				<li><a href="cp.html?ac=password">账号设置</a></li>
				<li><a href="cp.html?ac=privacy">隐私筛选</a></li>
			</ul>
       -->
		</div>
	</div>
	
	<div class="mgs_list">
		<!--$if{_SGLOBAL['member']['notenum']}-->
		<div><img src="image/icon/notice.gif"><a href="space.html?do=notice"><strong>${_SGLOBAL['member']['notenum']}</strong> 条新通知</a></div>
		<!--$end-->
		<!--$if{ addfriendcount}--><div><img src="image/icon/friend.gif" alt="" /><a href="cp.html?ac=friend&op=request"><strong>${addfriendcount}</strong> 个好友请求</a></div><!--$end-->
		<!--$if{ mtaginvitecount}--><div><img src="image/icon/mtag.gif" alt="" /><a href="cp.html?ac=mtag&op=mtaginvite"><strong>${mtaginvitecount}</strong> 个群组邀请</a></div><!--$end-->
		<!--$if{ myinvitecount}--><div><img src="image/icon/userapp.gif" alt="" /><a href="space.html?do=notice&view=userapp"><strong>${myinvitecount}</strong> 个应用消息</a></div><!--$end-->
		<!--$if{ _SGLOBAL['member']['newpm']}--><div><img src="image/icon/pm.gif" alt="" /><a href="space.html?do=pm"><strong>${_SGLOBAL['member']['newpm']}</strong> 条新短消息</a></div><!--$end-->
		<!--$if{ pokecount}--><div><img src="image/icon/poke.gif" alt="" /><a href="cp.html?ac=poke"><strong>${pokecount}</strong> 个新招呼</a></div><!--$end-->
		<!--$if{ newreport}--><div><img src="image/icon/report.gif" alt="" /><a href="admincp.html?ac=report"><strong>${newreport}</strong> 个举报</a></div><!--$end-->
		<!--$if{ namestatus}--><div><img src="image/icon/profile.gif" alt="" /><a href="admincp.html?ac=name&perpage=20&namestatus=0&searchsubmit=1"><strong>${namestatus}</strong> 个待认证用户</a></div><!--$end-->
	</div>
	
	<div class="tabs_header" style="padding-top:10px;">
		
		<!--$if{ _SCONFIG['my_status']}-->
		<ul class="tabs">
			<li id="viewall" onmouseover="showMenu(this.id)"${my_actives['all']}><a href="${theurl}&filter=all"><span>全部动态 <img src="image/tri.gif" alt="" /></span></a></li>
			<li id="viewsite" onmouseover="showMenu(this.id)"${my_actives['site']}><a href="${theurl}&filter=site"><span>站内 <img src="image/tri.gif" alt="" /></span></a></li>
			<li id="viewmyapp" onmouseover="showMenu(this.id)"${my_actives['myapp']}><a href="${theurl}&filter=myapp"><span>应用 <img src="image/tri.gif" alt="" /></span></a></li>
		</ul>
		<!--$else-->
		<ul class="tabs">
			<li${actives['we']}><a href="space.html?do=home&view=we"><span>好友的动态</span></a></li>
			<li${actives['all']}><a href="space.html?do=home&view=all"><span>大家的</span></a></li>
			<li${actives['me']}><a href="space.html?do=home&view=me"><span>自己的</span></a></li>
		</ul>
		<!--$end-->
	</div>
<!--$else-->
<!--${_TPL.put("spacetitle", ("动态"))}-->
<!--$embed{"space_menu.htm"}-->
<!--$end-->
	
	<div class="feed">
	
	<!--$if{!_SCOOKIE['closefeedbox'] && _SGLOBAL['ad']['feedbox']}-->
	<div id="feed_box" class="ye_r_t"><div class="ye_l_t"><div class="ye_r_b"><div class="ye_l_b">
		<div class="task_notice">
			<a title="忽略" class="float_cancel" href="javascript:;" onclick="close_feedbox();">忽略</a>
			<div class="task_notice_body">
			<!--{ad/feedbox}-->
			</div>
		</div>
	</div></div></div></div>
	<!--$end-->
	
	<!--$if{ list}-->
		<div id="feed_div" class="enter-content">
		<!--$for{map:list}-->
			<!--$if{ map.key=='yesterday'}--><h4 class="feedtime">昨天</h4><!--$elseif{ map.key!='today'}--><h4 class="feedtime">${map.key}</h4><!--$end-->
			<ul>
			<!--$for{value:map.value}-->
				<!--$embed{"space_feed_li.htm"}-->
			<!--$end-->
			</ul>
		<!--$end-->
		</div>
		<!--$if{ space['feedfriend'] && count==perpage}-->
		<div class="page" style="padding-top:20px;"><a href="javascript:;" onclick="feed_more();" id="a_feed_more">&gt;&gt; 查看更多动态</a></div>
		<div id="ajax_wait"></div>
		<!--$end-->
	<!--$else-->
		<div class="c_form">
			还没有相关动态，<a href="space.html?do=home&view=all">去看看大家的动态</a>。
		</div>
	<!--$end-->
	</div>
</div>
<!--/content-->

<div id="sidebar">
	<!--$if{ task}-->
	<div class="ye_r_t"><div class="ye_l_t"><div class="ye_r_b"><div class="ye_l_b">
		<div class="task_notice" style="width:230px;">
			<a title="忽略" class="float_cancel" href="cp.html?ac=task&taskid=${task['taskid']}&op=ignore">忽略</a>
			<div class="task_notice_body">
				<img src="${task['image']}" alt="" class="icon" />
				<h3><a href="cp.html?ac=task&op=do&taskid=${task['taskid']}">${task['name']}</a></h3>
				<p>可获得 <span class="num">${task['credit']}</span> 积分</p>
			</div>
		</div>
	</div></div></div></div>
	<!--$end-->
	
	<!--$if{ visitorlist}-->
	<div class="sidebox">
		<h2 class="title">
			<p class="r_option">
				<a href="space.html?uid=${space['uid']}&do=friend&view=visitor">全部</a>
			</p>
			最近来访
		</h2>
		<ul class="avatar_list">
			<!--$for{value:visitorlist}-->
			<li>
				<div class="avatar48"><a href="space.html?uid=${value['vuid']}"><img src="<!--${&com.heaven.web.utils.Common.avatar(value['vuid'],'small')}-->" alt="${_SN[value['vuid']]}" /></a></div>
				<p<!--$if{ ols[value[vuid]]}--> class="online_icon_p" title="在线"<!--$end-->><a href="space.html?uid=${value['vuid']}" title="${_SN[value['vuid']]}">${_SN[value['vuid']]}</a></p>
				<p class="time">${&com.heaven.web.utils.Common.date(value['dateline'],"MM月dd日")}</p>
			</li>
			<!--$end-->
		</ul>
	</div>
	<!--$end-->
	
	<!--$if{ olfriendlist}-->
	<div class="sidebox">
		<h2 class="title">
			<p class="r_option">
				<a href="space.html?uid=${space['uid']}&do=friend">全部</a>
			</p>
			我的好友
		</h2>
		<ul class="avatar_list">
			<!--$for{value:olfriendlist}-->
			<li>
				<div class="avatar48"><a href="space.html?uid=${value['uid']}"><img src="<!--${&com.heaven.web.utils.Common.avatar(value['uid'],'small')}-->" alt="${_SN[value['uid']]}" /></a></div>
				<p<!--$if{ value['isonline']}--> class="online_icon_p" title="在线"<!--$end-->><a href="space.html?uid=${value['uid']}" title="${_SN[value['uid']]}">${_SN[value['uid']]}</a></p>
				<p class="time"><!--$if{ value['lastactivity']}--><!--${&com.heaven.web.utils.Common.sgmdate('HH:mm',value['lastactivity'],true)}--><!--$else-->热度(${value['num']})<!--$end--></p>
			</li>
			<!--$end-->
		</ul>
	</div>
	<!--$end-->
	
	<!--$if{ birthlist}-->
	<div class="searchfirend">
		<div class="ye_r_t"><div class="ye_l_t"><div class="ye_r_b"><div class="ye_l_b">
			<h3>好友生日提醒</h3>
			<div class="box">
			<table cellpadding="2" cellspacing="4">
			<!--$for{entry:birthlist} $set{values=entry.value}-->
			<tr>
				<td align="right" valign="top" style="padding-left:10px;">
				<!--$if{ values[0]['istoday']}-->今天<!--$else-->${values[0]['birthmonth']}-${values[0]['birthday']}<!--$end-->
				</td>
				<td style="padding-left:10px;">
				<ul>
				<!--$for{value:values}-->
				<li><a href="space.html?uid=${value['uid']}">${_SN[value['uid']]}</a></li>
				<!--$end-->
				</ul>
				</td>
			</tr>
			<!--$end-->
			</table>
			</div>
		</div></div></div></div>
	</div>
	<!--$end-->
	
	<div class="searchfirend">
		<div class="ye_r_t"><div class="ye_l_t"><div class="ye_r_b"><div class="ye_l_b">
			<form method="post" action="cp.html?ac=friend">
			<p>
				<!--$if{ _SCONFIG['realname']}-->姓名: <!--$else-->用户名:<!--$end--> 
				<input type="text" name="username" value="" class="t_input" size="15" />
				<input type="hidden" name="searchmode" value="1" />
				<input type="hidden" name="findsubmit" value="1" />
        <span class="button"><span><button type="submit" id="add" name="findsubmit_btn" tabindex="2">&nbsp;找人&nbsp;</button></span></span>
			</p>
			<p><a href="cp.html?ac=friend&op=find">你可能认识的人</a><span class="pipe">|</span>
				<a href="cp.html?ac=invite">更多方式寻找</a></p>
			<input type="hidden" name="formhash" value="${&com.heaven.web.utils.Common.formhash()}" />
			</form>
		</div></div></div></div>
	</div>
	
</div>
<!--/sidebar-->


<!--$if{ _SCONFIG['my_status']}-->
<ul id="viewall_menu" class="dropmenu_drop" style="display: none">
	<li><a href="space.html?do=home&view=we&filter=all"${actives['we']}>好友的</a></li>
	<li><a href="space.html?do=home&view=all&filter=all"${actives['all']}>大家的</a></li>
	<li><a href="space.html?do=home&view=me&filter=all"${actives['me']}>自己的</a></li>
</ul>
<ul id="viewsite_menu" class="dropmenu_drop" style="display: none">
	<li><a href="space.html?do=home&view=we&filter=site"${actives['we']}>好友的</a></li>
	<li><a href="space.html?do=home&view=all&filter=site"${actives['all']}>大家的</a></li>
	<li><a href="space.html?do=home&view=me&filter=site"${actives['me']}>自己的</a></li>
</ul>
<ul id="viewmyapp_menu" class="dropmenu_drop" style="display: none">
	<li><a href="space.html?do=home&view=we&filter=myapp"${actives['we']}>好友的</a></li>
	<li><a href="space.html?do=home&view=all&filter=myapp"${actives['all']}>大家的</a></li>
	<li><a href="space.html?do=home&view=me&filter=myapp"${actives['me']}>自己的</a></li>
</ul>
<!--$end-->

<script type="text/javascript">
	var old_html = '';
	var next = ${start};
	function mood_from() {
		old_html = document.getElementById('mystate').innerHTML;
		document.getElementById('mystate').innerHTML = document.getElementById('mood_form').innerHTML;
	}
	function mood_form_cancel() {
		document.getElementById('mystate').innerHTML = old_html;
	}
	function feed_more() {
		var x = new Ajax('XML', 'ajax_wait');
		next = next + ${perpage};
		x.get('cp.html?ac=feed&op=get&start='+next+'&view=${view}&appid=${appid}&icon=${icon}&filter=${filter}', function(s){
			document.getElementById('feed_div').innerHTML += s;
		});
	}
	function close_feedbox() {
		var x = new Ajax();
		x.get('cp.html?ac=common&op=closefeedbox', function(s){
			document.getElementById('feed_box').style.display = 'none';
		});
	}

</script>

<!--${&com.heaven.web.utils.Common.my_checkupdate()}-->
<!--$embed{"footer.htm"}-->
